package com.wing.common.constant;

/**
 * Security的常量
 *
 * @author
 */
public interface SecurityConstants {

    /**
     * 认证请求头key
     */
    String AUTHORIZATION_KEY = "Authorization";

    /**
     * JWT令牌前缀
     */
    String JWT_PREFIX = "Bearer ";

    /**
     * Basic认证前缀
     */
    String BASIC_PREFIX = "Basic ";

    /**
     * JWT载体key
     */
    String JWT_PAYLOAD_KEY = "payload";

    /**
     * JWT ID 唯一标识
     */
    String JWT_JTI = "jti";

    /**
     * JWT ID 唯一标识
     */
    String JWT_EXP = "exp";

    /**
     * 黑名单token前缀 禁用名单
     */
    String TOKEN_BLACKLIST_PREFIX = "auth:token:blacklist:";
    String TOKEN_DISABLEDLIST_PREFIX = "auth:token:disabledlist:";

    String USER_ID_KEY = "userId";

    String USER_NAME_KEY = "username";

    String NICK_NAME_KEY = "nickname";

    String ENTERPRISE_CODE_KEY = "enterpriseCode";

    String CHANNEL_CODE_KEY = "channelCode";

    String ENTERPRISE_ID_KEY = "enterpriseId";

    //公司id
    String COMPANYINFO_ID_KEY = "companyInfoId";

    String POST_ID_KEY = "postId";

    String ENTERPRISE_NAME_KEY = "enterpriseName";


    String DEPARTMENT_ID_KEY = "departmentId";

    String ROLE_ID_KEY = "roleId";

    String DEPARTMENT_NAME_KEY = "departmentName";

    String USER_PHONE_KEY = "phone";

    String ROLE_NAME_KEY = "roleName";

    String ROLE_CODE_KEY = "roleCode";

    String CAB_AUTH_CODES_KEY = "cabAuthCodes";

    String CLIENT_ID_KEY = "client_id";

    /**
     * JWT存储权限前缀
     */
    String AUTHORITY_PREFIX = "ROLE_";

    /**
     * JWT存储权限属性
     */
    String JWT_AUTHORITIES_KEY = "authorities";
    String JWT_CLIENT_ID = "client_id";

    String GRANT_TYPE_KEY = "grant_type";

    String REFRESH_TOKEN_KEY = "refresh_token";

    String APP_API_PATTERN = "/*/app/**";

    /**
     * 认证方式
     */
    String AUTHENTICATION_METHOD = "authMethod";

    /**
     * 验证码key前缀
     */
    String VALIDATE_CODE_PREFIX = "VALIDATE_CODE:";

    /**
     * 短信验证码key前缀
     */
    String SMS_CODE_PREFIX = "SMS_CODE:";

    String DS_PHONE_PREFIX="DS_PHONE:";

    String DS_DOMAIN_PREFIX="DS_DOMAIN:";

    /**
     * 接口文档 Knife4j 测试客户端ID
     */
    String TEST_CLIENT_ID = "client";

    /**
     * 系统管理 web 客户端ID
     */
    String ADMIN_CLIENT_ID = "webApp";

    /**
     * 移动端（H5/Android/IOS）客户端ID
     */
    String APP_CLIENT_ID = "mobileApp";

    /**
     * 小程序端（微信小程序、....） 客户端ID
     */
    String WEAPP_CLIENT_ID = "miniApp";

    /**
     * 小程序端（微信小程序、....） 客户端ID
     */
    String WXAPP_CLIENT_ID = "wxApp";

    String PC_CLIENT_ID = "pc";

    String WAREHOUSE_CLIENT_ID = "warehouse";

    String LOGOUT_PATH = "/oauth2/admin/login/logout";

    String COST_CENTER = "costCenter";

}
